package com.ybwh.springboot2.common.xss;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * <p>
 * 加在要防止xss攻击的字段上
 * </p>
 *
 * @author fanbeibei
 * @version 1.0.0
 * @date 2023/8/9 11:17
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
@JacksonAnnotationsInside
@JsonSerialize(using = XssJacksonSerializer.class)
@JsonDeserialize(using = XssJacksonDeserializer.class)
public @interface XssEscape {
}
